package com.zdsoft.finance.product.entity;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.zdsoft.framework.core.common.domain.BaseEntity;



/**
 * 产品业务
 * @author longwei
 * @date 2016/11/08
 * @version 1.0
 */
@Entity
@Table(name="zf_product_business")
public class ProductBusiness extends BaseEntity{

	/**
	 * 最小金额（元）
	 */
	@Column(precision=15,scale=2)
	private BigDecimal minAmount;
	
	/**
	 * 最大金额
	 */
	@Column(precision=15,scale=2)
	private BigDecimal maxAmount;
	
	/**
	 * 最大期限
	 */
	@Column
	private Integer maxDeadline;
	
	/**
	 * 默认期限单位
	 */
	@Column(length=32)
	private String deadlineUnit;
	
	/**
	 * 默认还款方式
	 */
	@Column(length=32)
	private String repayMethodCd;
	
	/**
	 * 最小利率
	 */
	@Column
	private Double minRate;
	
	/**
	 * 最大利率
	 */
	@Column
	private Double maxRate;
	
	/**
	 * 默认利率单位
	 */
	@Column(length=32)
	private String rateUnit;
	
	/**
	 * 是否收取咨询服务费
	 */
	@Column(columnDefinition="boolean")
	private Boolean isConsultFee;
	
	/**
	 * 本金逾期罚息率
	 */
	@Column
	private Double overdueInterestRate;
	
	/**
	 * 利息复利率
	 */
	@Column
	private Double interestRate;
	
	/**
	 * 上会时限（天）
	 */
	@Column
	private Integer meetLimit;
	
	/**
	 * 是否期限内算尾
	 */
	@Column(columnDefinition="boolean")
	private Boolean isDeadlineWake;
	
	/**
	 * 是否项目内算尾
	 */
	@Column(columnDefinition="boolean")
	private Boolean isProjectWake;
	
	/**
	 * 意向函有效期
	 */
	@Column
	private Integer intentLetterTerm;
	
	/**
	 * 正式函有效期
	 */
	@Column
	private Integer officialLetterTerm;
	
	/**
	 * 意向函有效期单位
	 */
	@Column(length=32)
	private String intentLetterUnit;
	
	/**
	 * 正式函有限期单位
	 */
	@Column(length=32)
	private String officialLetterUnit;
	
	/**
	 * 备注
	 */
	@Lob
	private String remark;
	
	/**
	 * 所属产品
	 */
	@OneToOne
	@JoinColumn(name="product_id")
	private Product product;

	public BigDecimal getMinAmount() {
		return minAmount;
	}

	public void setMinAmount(BigDecimal minAmount) {
		this.minAmount = minAmount;
	}

	public BigDecimal getMaxAmount() {
		return maxAmount;
	}

	public void setMaxAmount(BigDecimal maxAmount) {
		this.maxAmount = maxAmount;
	}

	public Integer getMaxDeadline() {
		return maxDeadline;
	}

	public void setMaxDeadline(Integer maxDeadline) {
		this.maxDeadline = maxDeadline;
	}

	public String getDeadlineUnit() {
		return deadlineUnit;
	}

	public void setDeadlineUnit(String deadlineUnit) {
		this.deadlineUnit = deadlineUnit;
	}

	public String getRepayMethodCd() {
		return repayMethodCd;
	}

	public void setRepayMethodCd(String repayMethodCd) {
		this.repayMethodCd = repayMethodCd;
	}

	public Double getMinRate() {
		return minRate;
	}

	public void setMinRate(Double minRate) {
		this.minRate = minRate;
	}

	public Double getMaxRate() {
		return maxRate;
	}

	public void setMaxRate(Double maxRate) {
		this.maxRate = maxRate;
	}

	public void setOverdueInterestRate(Double overdueInterestRate) {
		this.overdueInterestRate = overdueInterestRate;
	}

	public void setInterestRate(Double interestRate) {
		this.interestRate = interestRate;
	}

	public String getRateUnit() {
		return rateUnit;
	}

	public void setRateUnit(String rateUnit) {
		this.rateUnit = rateUnit;
	}

	public Boolean getIsConsultFee() {
		return isConsultFee;
	}

	public void setIsConsultFee(Boolean isConsultFee) {
		this.isConsultFee = isConsultFee;
	}

	public Double getOverdueInterestRate() {
		return overdueInterestRate;
	}

	public Double getInterestRate() {
		return interestRate;
	}

	public Integer getMeetLimit() {
		return meetLimit;
	}

	public void setMeetLimit(Integer meetLimit) {
		this.meetLimit = meetLimit;
	}

	public Boolean getIsDeadlineWake() {
		return isDeadlineWake;
	}

	public void setIsDeadlineWake(Boolean isDeadlineWake) {
		this.isDeadlineWake = isDeadlineWake;
	}

	public Boolean getIsProjectWake() {
		return isProjectWake;
	}

	public void setIsProjectWake(Boolean isProjectWake) {
		this.isProjectWake = isProjectWake;
	}

	public Integer getIntentLetterTerm() {
		return intentLetterTerm;
	}

	public void setIntentLetterTerm(Integer intentLetterTerm) {
		this.intentLetterTerm = intentLetterTerm;
	}

	public Integer getOfficialLetterTerm() {
		return officialLetterTerm;
	}

	public void setOfficialLetterTerm(Integer officialLetterTerm) {
		this.officialLetterTerm = officialLetterTerm;
	}

	public String getIntentLetterUnit() {
		return intentLetterUnit;
	}

	public void setIntentLetterUnit(String intentLetterUnit) {
		this.intentLetterUnit = intentLetterUnit;
	}

	public String getOfficialLetterUnit() {
		return officialLetterUnit;
	}

	public void setOfficialLetterUnit(String officialLetterUnit) {
		this.officialLetterUnit = officialLetterUnit;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}
	
}
